package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtLiveBroadcast;
import me.zhengjie.modules.finace_taxation.service.dto.FtLiveBroadcastDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtLiveBroadcastQueryParam;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-06-23
*/
public interface FtLiveBroadcastService {

    static final String CACHE_KEY = "ftLiveBroadcast";

    /**
    * 查询数据分页
    * @param map 条件
    * @param pageable 分页参数
    * @return PageInfo<FtLiveBroadcastDto>
    */
    PageInfo<FtLiveBroadcastDto> queryAll(Map<String,Object> map, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtLiveBroadcastDto>
    */
    List<FtLiveBroadcastDto> queryAll(FtLiveBroadcastQueryParam query);

    FtLiveBroadcast getById(String id);
    FtLiveBroadcastDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtLiveBroadcastDto resources);
    int updateById(FtLiveBroadcastDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    List<FtLiveBroadcast> getByIndustryId(String industryId);


    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
     void download(List<FtLiveBroadcastDto> all, HttpServletResponse response) throws IOException;

     /*批量添加*/
    int insertFtLiveBroadcasts(List<FtLiveBroadcast> ftLiveBroadcasts);
}
